#pragma once
#include "../scion_utilities/hzpch.h"
#include <unordered_map>
#include <glad/glad.h>
#include <glm/glm.hpp>

namespace SCION_RENDERING
{
  class Shader
  {
  private:
    GLuint m_ShaderProgramID;
    std::string m_sVertexPath, m_sFragmentPath;
    std::unordered_map<std::string, GLuint> m_UniformLoacationMap;
    GLuint GetUniformLocation(const std::string &uniformName);

  public:
    Shader();
    Shader(GLuint program, const std::string vertexPatch, const std::string &fragmentPath);
    ~Shader();

    void SetUniformInt(const std::string &name, int value);
    void SetUniformMat4(const std::string &name, const glm::mat4 &mat);

    void Enable();
    void Disable();

    inline const GLuint ShaderProgrameID() const
    {
      return m_ShaderProgramID;
    }

    void SetUniformFloat(const std::string &name, float value);
    void SetUniformVec2(const std::string &name, const glm::vec2 &value);
    void SetUniformVec3(const std::string &name, const glm::vec3 &value);
    void SetUniformVec4(const std::string &name, const glm::vec4 &value);
  };
}